package org.emet.jee.core.dao.arch;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

import org.apache.log4j.Logger;
import org.emet.jee.core.security.springsecurity.SpringSecurityUtils;

public class CurrentArchHolder {
	protected static final Map<String, Long> currentSF = new ConcurrentHashMap<String, Long>();;

	private static final Logger logger = Logger.getLogger(CurrentArchHolder.class);

	public static Long get() {
		return currentSF.get(SpringSecurityUtils.getSessionId());
	}

	public static void set(String key, Long value) {
		logger.info("Current user selected " + value);
		currentSF.put(key, value);
	}

	public static void removeAll() {
		currentSF.clear();
	}
}
